﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.controllers {
    import net.wooga.pets.events.*;
    import net.wooga.pets.models.*;
    import net.wooga.pets.constants.*;
    import org.robotlegs.mvcs.*;

    public class PreloadComputerDisplayCommand extends Command {

		[Inject]
        public var computerModel:ComputerModel;

        override public function execute():void{
            var _local3:Object;
            var _local4:String;
            var _local1:RequestEvent = new RequestEvent(EventConstants.SEND_REQUEST);
            var _local2:Array = this.computerModel.matrix.sortOn("minLevel", Array.NUMERIC);
            for each (_local3 in _local2) {
                _local4 = ((_local3.pet_name.toLowerCase() + "_") + _local3.disease_name.toLowerCase());
                _local1.addAssetRequest(ProtocolConstants.LOAD_COMPUTERDISPLAY, _local4, ProtocolConstants.PRELOADING_PIPE);
            };
            dispatch(_local1);
        }

    }
}//package net.wooga.pets.controllers 
